package comlibs.huydung
{
	import mx.containers.Panel;
	import mx.core.mx_internal;

	
	use namespace mx_internal;
	public class RightIconPanel extends Panel
	{
		[Bindable]
		public var titleIconPosition:String;
		
		private var _minimized:Boolean = false;
		private var _originHeight:Number = 0;
		
		public function RightIconPanel(){
			super();			
		}

        override protected function layoutChrome(unscaledWidth:Number, unscaledHeight:Number):void  { 
            super.layoutChrome(unscaledWidth, unscaledHeight); 
            var tio:Object = this.mx_internal::titleIconObject;
            var titleText:Object = this.mx_internal::getTitleTextField();

            if (tio != null && titleIconPosition == "right") {
                var h:Number = tio.height;
                var offset:Number = (this.getHeaderHeight() - h) / 2;
                tio.move(this.titleBar.width - 30, offset);
                titleText.move(10, offset + 3);	                
            }
        } 
	}
}